In a battery-operated device, such as a portable communication device, methods can be utilized to put the device in a low power mode and reduce current drain so that the battery charge lasts longer. In a Global System for Mobile (GSM) communication cellular phone, one technique involves entering a “deep sleep” state where much of the hardware is shutdown and the high-speed clock is turned off. The high speed clock source requires significant power to operate, and circuits consume more current as the driving clock speed increases. In “deep sleep”, the high speed clock source is powered-off for a period of time. During this time, a slow speed clock source is used, and is only drives a limited amout of circuitry. Many microprocessor-based products other than GSM phones have similar states they enter where certain hardware portions and clocks are powered off and must be powered on and become stable before the system can operate again. For example, microprocessors can turn off portions of themselves following low power mode instructions such as wait/doze/stop. In regards to communication functions, a paging mode can be defined for a battery-operated mobile radio, such as a cellular radiotelephone. In this mode, when the radiotelephone is in an idle mode (i.e., not engaged in a call), the radiotelephone does not continuously monitor a paging channel but generally remains in a low power, idle state. In the idle state, the radiotelephone wakes up only during predetermined time slots to see if there is an incoming call, as indicated on a paging channel, or to process some other condition, such as a user input. The goal of low power modes and paging mode operation is to reduce the on time of the radio to a minimum and to power down as much of the radio as possible during sleep periods.
A cellular phone is typically in an operating mode where it must periodically wake-up from deep sleep to read a paging block or perform some other physical layer (layer1) event. In GSM phones, there is a procedure followed to get into deep sleep and a procedure to get out of deep sleep. The procedures involve some delay when entering deep sleep and a significant delay when exiting deep sleep primarily to allow the hardware to warm-up and the clock source to become stable. During these delay times, and in addition to the wake-up periods, the current drain of the phone is increased over that during a sleep mode. Therefore, it is desirable to avoid entering and exiting deep sleep and experiencing the associated additional high current drain delay times. Moreover, if some processing is required at a time not coincident with a paging block operation, for example, this might also prevent entering deep sleep mode around the paging block due to the overhead of entering and exiting deep sleep and the time used up to perform the other processing.
One of the reasons the phone must wake-up from deep sleep other that for a layer 1 event is for an operating system (OS) event. These events can includes a time-of-day update to a display of the communication device, network communication protocol timers, peripheral interface timers, graphics display updates, and the like. The OS keeps track of the times at which it must perform a time-out related activity for a task (application). These activities include a task timing out waiting for a message, and the expiration of a timer to send a message to a task. For example, when a task has completed all the processing it can do, the task typically makes an application programming interface (API) call to the OS which swaps the task out and tells the OS when to run the task again, which can be when the task is sent a primitive (e.g. a message from another task) or after a fixed amount of time. The message itself can be sent to the task from another task or from an interrupt service routine. These activities are not synchronized to each other or to a layer1 communication event. The OS must set a timer to ensure that a particular task runs at the required time to perform the event. Therefore, an OS timer can cause the radiotelephone to need to be awake when the radiotelephone could otherwise be sleeping. The OS sets a hardware periodic interrupt timer (PIT) to the earliest overall value for all the OS timer events, which wakes the system from deep sleep. As a result, the communication device enters and exits sleep mode many times, asynchronously from those times required to enter and exit sleep mode for layer 1 communication tasks.
Accordingly, there is a need for a method for controlling entrance to and exit from a sleep mode in a communication device. There is a further need to reduce the frequency of entering and exiting deep sleep by getting as much done as possible while out of deep sleep and then remaining in deep sleep as long as possible.